package day06;

import com.sun.org.apache.bcel.internal.generic.PUSH;

import java.awt.*;
import java.util.Arrays;
import java.util.Random;

public class MethodDemo {
    public static void main(String[] args) {

        say();
        say("Star星雨");
        say("Star星雨", 18);








//
////        double num = getNum();
////        System.out.println(num);
//        int arr[] = genreateArray(5,5);
//        Arrays.sort(arr);
//        for (int i = 0; i < arr.length; i++) {
//            System.out.println(arr[i]);
//
//        }
//        System.out.println();
//        int num[] = genreateArray(10,100);
//        Arrays.sort(num);
//        for (int i = 0; i < num.length; i++) {
//            System.out.println(num[i]);
//
//        }
////        System.out.println(num1);
////        int a = 5, b = 3;
////        System.out.println(sum(a, b));
    }


    public static int sum(int num1, int num2) {
        int num = num1 + num2;
        return num;
    }

    public static void say() {
        System.out.println("我像你那个朋友?");
    }

    public static void say(String name) {
        System.out.println("我像" + name + "那个朋友?");
    }

    public static void say(String name, int age) {
        System.out.println("我像" + name + "那个朋友?他" + age + "岁了");
    }

//    public static double getNum() {
//        Random ran = new Random();
//        return ran.nextDouble() * 200.00;
//
//    }`








    public static int[] genreateArray(int len, int max) {
        Random ran = new Random();
        int[] arr = new int[len];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = ran.nextInt(max+1);
        }
        return arr;

    }


}

